<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 7.0/HTML Export Filter">
<LINK REL="STYLESHEET" HREF="KDM_1.0_13_actionpkg.css" CHARSET="ISO-8859-1" TYPE="text/css">
<TITLE> 13	Action Package</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<DIV>
<H6 CLASS="Heading">
<A NAME="pgfId-998826"></A><A NAME="58728"></A>Action Package</H6>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1086553"></A>Overview</H3>
<P CLASS="Body">
<A NAME="pgfId-1092977"></A>The Action package defines a set of meta-model elements whose purpose is to represent implementation-level behavior descriptions determined by programming languages, for example statements, operators, conditions, features, as well as their associations, for example control and data flow. Action package extends the KDM Code package. As a general rule, in a given KDM instance, each instance of an action element represents some programming language construct, determined by the programming language of the existing software system. Each instance of an action meta-model element corresponds to a certain region of the source code in one of the artifacts of the software system. An action element usually represents one or more statements, and an action relationship usually represents a usage of a name in a statement. </P>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1092979"></A><A NAME="_Toc131848286"></A>Organization of the Action Package</H3>
<P CLASS="Body">
<A NAME="pgfId-1092983"></A>The Action package consists of the following 11 class diagrams:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1092984"></A>ActionElements</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1092985"></A>ActionFlow</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1096905"></A>ActionInheritances</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1092987"></A>CallableRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1092988"></A>DataRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1096908"></A>ExceptionBlocks</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1096916"></A>ExceptionFlow</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1096909"></A>ExceptionRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1092989"></A>InterfaceRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1092991"></A>UsesRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1092992"></A>ExtendedActionElements</LI>
</UL>
<P CLASS="Body">
<A NAME="pgfId-1092994"></A>The Action package depends on the following packages:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1092996"></A>Core</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1096921"></A>kdm</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1092997"></A>Source</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1096924"></A>Core</LI>
</UL>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1095678"></A><A NAME="_Toc131848294"></A>ActionElements Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1097042"></A>In general, the Action package follows the uniform pattern for KDM models and extends the KDM Framework with specific meta-model elements related to implementation-level behavior. The Action package deviates from a uniform pattern for KDM models because the Action package does not define a separate KDM model, but rather extends the Code model, defined in the Code package. Therefore each Action element is a subclass of AbstractCodeElement. Action package defines most of the relationship types to the Code model. Together, Action and Code packages constitute the Program Elements Layer of KDM. </P>
<P CLASS="Body">
<A NAME="pgfId-1097048"></A>The ActionElements diagram defines the following classes determined by the KDM model pattern:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097049"></A>ActionElement - main class of the Action package.</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097051"></A>AbstractActionRelationship - a class representing an abstract parent of all KDM relationships that can be used to represent actions (in general, related to usages of names in programming language statements)</LI>
</UL>
<P CLASS="Body">
<A NAME="pgfId-1095684"></A>The class diagram shown in <A HREF="KDM_1.0_13_actionpkg.htm#65925" CLASS="XRef">See - ActionElements Class Diagram.</A> captures these classes and their relations. </P>
<P CLASS="Body">
<A NAME="pgfId-1095688"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-1.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption1">
<A NAME="pgfId-1095690"></A><A NAME="65925"></A>- ActionElements Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095692"></A><A NAME="_Toc131848295"></A>ActionElement Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095693"></A>The ActionElement is class to describe a basic unit of behavior. ActionElements are endpoints for primitive relations. ActionElement can be linked to the original representation through the SourceRef element from the Source package. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095694"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095695"></A>AbstractCodeElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096774"></A>Attributes</H6>
<P CLASS="Body">
<A NAME="pgfId-1096784"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1096777"></A>kind:String</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId-1096779"></A>represents the meaning of the operations, performed by the ActionElement.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1096772"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095696"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1095702"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1095699"></A>actionRelation:ActionRelationship[0..*]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1095701"></A>action relationships originating from the given action element</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1096169"></A>codeElement: AbstractCodeElement[0..*]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId-1096171"></A>owned code elements (for example, nexted action elements, or nested BlockUnits, or nested definitions of datatypes and computatinal objects)</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095704"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1096215"></A>	ActionElement may own StorableUnit or ValueElement and their subclasses and nested action elements</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095705"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096159"></A>An action element represents a unit of behavior. It can represent one or more programming language statements, or even a part of a programming language statement. It is the implementer's responsibility to select the granularity of the action elements. As a minimum, each ControlElement should own at least one ActionElment so that it can be the endpoint of all ActionRelationships originating from the corresponding ControlElement. Static analysis grade KDM implementations should use well-defined fine grained ActionElements, specified as the &quot;micro KDM&quot; compliance point.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097078"></A>Data elements owned by the ActionElement represent temporary variables or values used by the action element. Action elements may be nested, when one ActionElement instance is a container for other ActionElements.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096805"></A>For micro KDM compliace the list of the allowed action element kind values and their meaning is described in Appendix 1. For non-micro KDM implementation, the value of the kind is not normative.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097081"></A>It is the implementer's responsibility to map programming language statements and other descriptions of behavior into KDM ActionElements.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096167"></A>An ActionElement can own other ActionElements. Such ActionElement is called a &quot;composite action&quot;. Composite action represents an entire set of leaf actions owned directly or indirectly.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095827"></A><A NAME="_Toc131848288"></A>AbstractActionRelationship Class (abstract) </H4>
<P CLASS="Body">
<A NAME="pgfId-1095828"></A>The AbstractActionRelationship is the parent class representing various KDM relationships which originate from an ActionElement.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095829"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095830"></A>KDMRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095831"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095832"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095824"></A>Usually, an action relationship corresponds to some usage of a name in a programming language statement. Action relationships originate from ActionElements as opposed to code relationships which originate from code elements. AbstractActionRelationship is subclassed by several concrete action relationship meta-elements.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095707"></A><A NAME="_Toc131848296"></A>BlockUnit Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095708"></A>The BlockUnit represents logically and physically related blocks of ActionElement, for example, blocks of statements. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095709"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095711"></A>ActionElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095712"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1095718"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1095715"></A>codeElement:AbstractCodeElement[0..*]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1095717"></A>owned code elements, including nested BlockUnits</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095720"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095721"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097092"></A>A BlockUnit is a logical container for action elements. BlockUnit is similar to a composite ActionElement which can also contain nested ActionElement and data elements. BlockUnit represents the entire set of leaf Actions, owned by the BlockUnit directly or indirectly.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095723"></A><A NAME="_Toc131848297"></A>ControlElement (additional properties)</H4>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095724"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1095730"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1095727"></A>entryFlow:EntryFlow[0..*]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1095729"></A>EntryFlow relationships that associate the given control element and some action elements owned by it, which are designated as the entry actions.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095732"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095733"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097098"></A>Control flow is transferred to the Entry actions when the ControlElement that owns them is called. Multiple EntryFlow elements represent nondeterministic control flow.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1095760"></A>ActionInheritances Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1095761"></A>The ActionInheritances class diagram is determined by the uniform pattern for extending the KDM framework. Action package does not define a separate KDM model, but extends the Code model. The class diagram shown in <A HREF="KDM_1.0_13_actionpkg.htm#99298" CLASS="XRef">See - ActionInheritances Class Diagram.</A> captures these classes and their associations. </P>
<P CLASS="Body">
<A NAME="pgfId-1095770"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-2.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1095772"></A><A NAME="99298"></A>- ActionInheritances Class Diagram</H6>
<P CLASS="Body">
<A NAME="pgfId-1097109"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1097111"></A><A NAME="_Toc131848299"></A>ActionFlow Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1097112"></A>The ActionFlow class diagram provides basic meta-model constructs to define the control-flow between ActionElements. The class diagram shown in <A HREF="KDM_1.0_13_actionpkg.htm#70569" CLASS="XRef">See - ActionFlow Class Diagram.</A> captures these classes and their relations. </P>
<P CLASS="Body">
<A NAME="pgfId-1092485"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-3.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1093500"></A><A NAME="70569"></A>- ActionFlow Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095529"></A><A NAME="_Toc131848300"></A>ControlFlow Class (generic)</H4>
<P CLASS="Body">
<A NAME="pgfId-1095530"></A>The ControlFlow is a generic modeling element that represents control flow relation between two ActionElements. It is further subclassed with more specific modeling elements. ControlFlow class could be used to represent programming constructs that are not covered any of the specific subclasses as an extension point.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095531"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1093519"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093521"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1093531"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1093524"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1093526"></A>the origin of the control flow</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1093528"></A>to:ActionElement[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1093530"></A>the target of control flow, when represent the next action element in the trace determined by the control flow</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1093532"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093533"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1095538"></A>ControlFlow class should always be used with a stereotype.</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093535"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097126"></A>From the KDM representation perspective, ControlFlow meta-element is an extension point which can be used as the base element for new &quot;virtual&quot; meta-model elements, representing specific control flow relationships not covered by the semantic categories of its concrete subclasses. From the meta-model perspective, the ControlFlow element defines the common properties of various control flow relationship representations in KDM.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097129"></A>Multiple ControlFlow elements represent nondeterministic choice of behavior.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097130"></A>It is the implementer's responsibility to map control flow mechanisms of the given programming language into ControlFlow meta-elements. It is implementer's responsibility to adequately represent the control flows of the existing system by a a set of action elements and ControlFlow relationships between them.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1093538"></A><A NAME="_Toc131848301"></A>EntryFlow Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1093539"></A>The EntryFlow is a modeling element that represents an initial flow of control inside a ControlElement into the first ActionElement of the ControlElement. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093541"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1093542"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093544"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1093554"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1093547"></A>from:ControlElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1093549"></A>ControlElement that owns a one or more action elements that represents its behavior</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1093551"></A>to:ActionElement[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1093553"></A>the action element that is selected when the owner ControlElement is called</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093556"></A>Constraints</H6>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1095549"></A>Each ControlElement or its subclass such that it owns one or more ActionElement should have a corresponding EntryFlow relationship in which the &quot;from&quot; attribute is the ControlElement</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1095550"></A>The &quot;to&quot; attribute of an EntryFlow element should be an ActionElement that is owned by the ControlElement that is the &quot;from&quot; attribute of the EntryFlow</LI>
</UL>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093558"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097143"></A>The &quot;entry&quot; action element is the first action element in a trace which corresponds to the behavior of the owner ControlElement. Multiple action element which are the designated as &quot;entry&quot; actions, represent a nondeterministic choice, i.e. several possible trace families, each of which start with a different &quot;entry&quot; action element.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1093599"></A><A NAME="_Toc131848304"></A>Flow Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1093600"></A>The Flow class is a modeling element that represents control flow relationship between two ActionElements such that the the ActionElement that corresponds to the &quot;to&quot; attribute of the Flow is a successor of the ActionElement that corresponds to the &quot;from&quot; attribute of the Flow.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093602"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1093603"></A>ControlFlow</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093605"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1097370"></A>If there is one or more Flow elements there should be no TrueFlow, FalseFlow or GuardedFlow with the same action element as the &quot;from&quot; attribute.</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093607"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095563"></A>If there exists two or more Flow element, such that they share the same ActionElement as the &quot;from&quot; attribute, they represent an unspecified flow of control.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1093610"></A><A NAME="_Toc131848305"></A>TrueFlow Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1093611"></A>The TrueFlow class is a modeling element that represents control flow relationship between two ActionElements such that 1) the ActionElement that corresponds to the &quot;from&quot; attribute of the TrueFlow represents the logical condition; and 2) the ActionElement that corresponds to the &quot;to&quot; attribute of the TrueFlow is a successor of the ActionElement that corresponds to the &quot;from&quot; attribute of the TrueFlow when the value of the condition is true.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093613"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1093614"></A>ControlFlow</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093616"></A>Constraints</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095592"></A>If there exists an ActionElement with a TrueFlow element, there should be no GuardedFlow or Flow elements have the same ActionElement as the &quot;from&quot; attribute; (but there can be FalseFlow).</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093618"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097157"></A>If there exists two or more TrueFlow element, such that they share the same ActionElement as the &quot;from&quot; attribute, they represent an unspecified flow of control. If there is no FalseFlow element, then the current ActionElement is terminal, when condition is not satisfied</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097162"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1093621"></A><A NAME="_Toc131848306"></A>FalseFlow Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1093622"></A>The FalseFlow class is a modeling element that represents control flow relationship between two ActionElements such that 1) the ActionElement that corresponds to the &quot;from&quot; attribute of the FalseFlow represents the logical condition; and 2) the ActionElement that corresponds to the &quot;to&quot; attribute of the FalseFlow is a successor of the ActionElement that corresponds to the &quot;from&quot; attribute of the FalseFlow when the value of other conditions are not satisfied. FalseFlow represents the &quot;default&quot; control flow branch in representing conditional statements and switch statements. FalseFlow is a specific modeling element that is used in combination with either TrueFlow or GuardedFlow.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093624"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1093625"></A>ControlFlow</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095583"></A>Constraints</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095595"></A>If there exists a FalseFlow element, there should be either 1) a corresponding TrueFlow element such that the both the TrueFlow and the FalseFlow elements has the same ActionElement as the &quot;from&quot; attribute; or 2) one or more GuardedFlow elements that have the same ActionElement as the &quot;from&quot; attribute; and 3) there are no other relationship elements that are subclasses of FlowRelationship that have the same ActionElement as the &quot;from&quot; attribute;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095585"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097165"></A>If there exists two or more FalseFlow element, such that they share the same ActionElement as the &quot;from&quot; attribute, they represent an unspecified flow of control.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097163"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1093632"></A><A NAME="_Toc131848307"></A>GuardedFlow Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1093633"></A>The GuardedFlow class is a modeling element that represents control flow relationship between two or more ActionElements such that 1) the ActionElement that corresponds to the &quot;from&quot; attribute of the GuardedFlow represents the selection statement (for example, a &quot;switch&quot; statement); and 2) the ActionElement that corresponds to the &quot;to&quot; attribute of the GuardedFlow represents the guarding condition which determines a branch of control flow; and 3) the branch of control flow determined by the ActionElement that corresponds to the &quot;to&quot; attribute of the GuardedFlow element is a successor of the ActionElement that corresponds to the &quot;from&quot; attribute of the GuardedFlow when the guarded condition in the context of the selection statement is satisfied. FalseFlow element can be used in combination with one or more GuardedFlow elements to represent the default branch of control flow, for example, to represent the default branch of a switch statement.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093635"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1093636"></A>ControlFlow</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093638"></A>Constraints</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095604"></A>If there exists a GuardedFlow element, there should be no other relationship elements that are subclasses of FlowRelationship that have the same ActionElement as the &quot;from&quot; attribute, with exception of one or more GuardedFlow elements or zero or one FalseFlow element.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093640"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097168"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1093644"></A><A NAME="_Toc131848308"></A>CallableRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1093646"></A>The CallableRelations class diagram defines a set of meta-model elements to represent call-type behavior that associate ActionElement to ControlElement and represent control flows of the existing software system. </P>
<P CLASS="Body">
<A NAME="pgfId-1093648"></A>The CallableRelations diagram describes the following types:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1095610"></A>Calls - is a modeling element that represents a call-type relationship between an ActionElement and a CallableElement or one of its subclass elements, in which the ActionElement represents some form of a call statement, and the CallableElement represents the element being called.</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1095611"></A>Dispatches - is a modeling element that represents an call-type of relationship between an ActionElement and a data item, in which the ActionElement represents some form of a call, and the data item represents a pointer to a procedure type.</LI>
</UL>
<P CLASS="Body">
<A NAME="pgfId-1093501"></A>The class diagram shown in <A HREF="KDM_1.0_13_actionpkg.htm#73014" CLASS="XRef">See - CallableRelations Class Diagram.</A> captures these classes and their relations.</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-4.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1093859"></A><A NAME="73014"></A>- CallableRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1093873"></A><A NAME="_Toc131848309"></A>Calls Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1093874"></A>Calls is a modeling element that represents a call-type relationship between an ActionElement and a ControlElement or one of its subclass elements. The ActionElement represents some form of a call statement, and the ControlElement represents the element being called. In the meta-model the Calls element is a subclass of ActionRelationship.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093876"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1093877"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093879"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1093889"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1093882"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1093884"></A>the action element from which the call relation originates</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1093886"></A>to:ControlElement[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1093888"></A>the target ControlElement</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093891"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093892"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097181"></A>Calls relationship corresponds to the ISO/IEC 11404 &quot;invoke&quot; operation on a procedure type. It can represent a call to a procedure, a static method, a non-static method of a particular object instance, a virtual method or an interface element.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097186"></A>Calls relation to a non-static method should be accompanied by an Addresses relationship to the corresponding object.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097193"></A>Precise semantics of a call can be represented by the &quot;kind&quot; element of the owner ActionElement, according to the guidelines provided in the &quot;micro KDM&quot; compliance point.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097182"></A>Dispatches Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1097183"></A>Dispatches is a modeling element that represents a call-type of relationship between an ActionElement and a data item. The ActionElement represents some form of a call behavior, and the data item represents a pointer to a procedure type.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093921"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1093922"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093924"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1093934"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1093927"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097195"></A>the action element from which the call relation originates</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1093931"></A>to:DataElement[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1093933"></A>the data element that represents the pointer to a procedure type</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093936"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093938"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097207"></A>Dispatches relation does not identify the actual target of the call. Additional analysis of the KDM instance may be required to determine the real targets of the Dispatches call.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097397"></A>Example (C):</H6>
<P CLASS="example">
<A NAME="pgfId-1097403"></A>typedef int(*fp)(int i );</P>
<P CLASS="example">
<A NAME="pgfId-1097404"></A>int foo(int i){}</P>
<P CLASS="example">
<A NAME="pgfId-1097405"></A>int bar( int i) {}</P>
<P CLASS="example">
<A NAME="pgfId-1097406"></A>void foobar() {</P>
<P CLASS="example">
<A NAME="pgfId-1097407"></A>	fp pf;</P>
<P CLASS="example">
<A NAME="pgfId-1097408"></A>	pf=foo;</P>
<P CLASS="example">
<A NAME="pgfId-1097409"></A>	pf=bar;</P>
<P CLASS="example">
<A NAME="pgfId-1097410"></A>	*pf(1);</P>
<P CLASS="example">
<A NAME="pgfId-1097411"></A>}</P>
<P CLASS="example">
<A NAME="pgfId-1097430"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1097432"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097433"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097494"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097495"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097496"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097497"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;Dispatch Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097434"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097435"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;code:CompilationUnit&quot; name=&quot;Dispatch.c&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097436"></A>      &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:CallableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097498"></A>			name=&quot;foo&quot; type=&quot;id.15&quot; kind=&quot;regular&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097437"></A>        &lt;codeRelation xmi:id=&quot;id.3&quot; xmi:type=&quot;code:HasType&quot; to=&quot;id.14&quot; from=&quot;id.2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097438"></A>        &lt;codeElement xmi:id=&quot;id.4&quot; xmi:type=&quot;code:Signature&quot; name=&quot;foo&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097439"></A>          &lt;parameterUnit xmi:id=&quot;id.5&quot; name=&quot;a&quot; type=&quot;id.13&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097440"></A>          &lt;parameterUnit xmi:id=&quot;id.6&quot; type=&quot;id.13&quot; kind=&quot;return&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097441"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097442"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097443"></A>      &lt;codeElement xmi:id=&quot;id.7&quot; xmi:type=&quot;code:CallableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097499"></A>			name=&quot;bar&quot; type=&quot;id.15&quot; kind=&quot;regular&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097444"></A>        &lt;codeRelation xmi:id=&quot;id.8&quot; xmi:type=&quot;code:HasType&quot; to=&quot;id.14&quot; from=&quot;id.7&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097445"></A>        &lt;codeElement xmi:id=&quot;id.9&quot; xmi:type=&quot;code:Signature&quot; name=&quot;bar&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097446"></A>          &lt;parameterUnit xmi:id=&quot;id.10&quot; name=&quot;a&quot; type=&quot;id.13&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097447"></A>          &lt;parameterUnit xmi:id=&quot;id.11&quot; type=&quot;id.13&quot; kind=&quot;return&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097448"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097449"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097450"></A>      &lt;codeElement xmi:id=&quot;id.12&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;pf&quot; type=&quot;id.14&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097451"></A>      &lt;codeElement xmi:id=&quot;id.13&quot; xmi:type=&quot;code:IntegerType&quot; name=&quot;int&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097452"></A>      &lt;codeElement xmi:id=&quot;id.14&quot; xmi:type=&quot;code:TypeUnit&quot; name=&quot;fp&quot; type=&quot;id.15&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097453"></A>        &lt;codeElement xmi:id=&quot;id.15&quot; xmi:type=&quot;code:Signature&quot; name=&quot;f&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097454"></A>          &lt;parameterUnit xmi:id=&quot;id.16&quot; name=&quot;a&quot; type=&quot;id.13&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097455"></A>          &lt;parameterUnit xmi:id=&quot;id.17&quot; type=&quot;id.13&quot; kind=&quot;return&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097456"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097457"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097458"></A>      &lt;codeElement xmi:id=&quot;id.18&quot; xmi:type=&quot;code:CallableUnit&quot; name=&quot;foobar&quot; type=&quot;id.33&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097459"></A>        &lt;entryFlow xmi:id=&quot;id.19&quot; to=&quot;id.20&quot; from=&quot;id.18&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097460"></A>        &lt;codeElement xmi:id=&quot;id.20&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a1&quot; kind=&quot;Assign&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097461"></A>          &lt;actionRelation xmi:id=&quot;id.21&quot; xmi:type=&quot;action:Addresses&quot; to=&quot;id.2&quot; from=&quot;id.20&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097462"></A>          &lt;actionRelation xmi:id=&quot;id.22&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.12&quot; from=&quot;id.20&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097463"></A>          &lt;actionRelation xmi:id=&quot;id.23&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.24&quot; from=&quot;id.20&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097464"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097465"></A>        &lt;codeElement xmi:id=&quot;id.24&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a2&quot; kind=&quot;Assign&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097466"></A>          &lt;actionRelation xmi:id=&quot;id.25&quot; xmi:type=&quot;action:Addresses&quot; to=&quot;id.2&quot; from=&quot;id.24&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097467"></A>          &lt;actionRelation xmi:id=&quot;id.26&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.12&quot; from=&quot;id.24&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097468"></A>          &lt;actionRelation xmi:id=&quot;id.27&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.28&quot; from=&quot;id.24&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097469"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097470"></A>        &lt;codeElement xmi:id=&quot;id.28&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a3&quot; kind=&quot;PtrCall&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097471"></A>          &lt;codeElement xmi:id=&quot;id.29&quot; xmi:type=&quot;code:Value&quot; name=&quot;1&quot; type=&quot;id.13&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097472"></A>          &lt;actionRelation xmi:id=&quot;id.30&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.12&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097473"></A>          &lt;actionRelation xmi:id=&quot;id.31&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.29&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097474"></A>          &lt;actionRelation xmi:id=&quot;id.32&quot; xmi:type=&quot;action:Dispatches&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097500"></A>			to=&quot;id.12&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097475"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097476"></A>        &lt;codeElement xmi:id=&quot;id.33&quot; xmi:type=&quot;code:Signature&quot; name=&quot;foobar&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097477"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097478"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097479"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097480"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097395"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1093998"></A><A NAME="_Toc131848315"></A>DataRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1093999"></A>The DataRelations class diagram defines a set of meta-model elements which represent data flow relationships between action elements and data elements. The &quot;from&quot; endpoint of these relationship is some ActionElement that represents a   statement that involves a data operation. The &quot;to&quot; endpoint represents some code item. Data relationships are shown at <A HREF="KDM_1.0_13_actionpkg.htm#50289" CLASS="XRef">See - DataRelations Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1093861"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-5.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1093862"></A><A NAME="50289"></A>- DataRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094154"></A><A NAME="_Toc131848316"></A>Reads Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094155"></A>The Reads relationship represents a flow of data from a DataElement to an ActionElement (read access to the DataElement).</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094157"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094158"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094160"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094170"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1094163"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1094165"></A>the action element which owns the Reads relationship</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1094167"></A>to:DataElement[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1094169"></A>the DataElement which is the source of the flow of data</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094172"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094174"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097502"></A>Reads relationship represents an association between an action element which implements a flow of data from a certain data element to the corresponding data element according to the semantics of the programming language of the existing software system.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094177"></A><A NAME="_Toc131848317"></A>Writes Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094178"></A>The Writes represents flow of data from an ActionElement to a DataElement (write access to the DataElement).</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094180"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094181"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094183"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094193"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1097249"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097251"></A>the action element which owns the Writes relationship</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1097253"></A>to:DataElement[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097255"></A>the DataElement which is the sink of the flow of data</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094195"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094197"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097515"></A>Writes relationship represents an association between an action element which implements a flow of data to a certain data element to the corresponding data element according to the semantics of the programming language of the existing software system.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094200"></A><A NAME="_Toc131848318"></A>Addresses Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095509"></A>Addresses relationship represents access to a complex data structure, where the Reads or Writes relationships are applied to the elements of the data structure, or where an address of a data element is taken.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094203"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094204"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094206"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094216"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1094209"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097259"></A>the action element which owns the Addresses relationship</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1094213"></A>to:ComputationalObject[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097261"></A>the Computational object which is being accessed</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094218"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094220"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097529"></A>Addresses relationship represents an association between an action element which receives a reference to a certain data element to the corresponding data element according to the semantics of the programming language of the existing software system.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097527"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094223"></A><A NAME="_Toc131848319"></A>Creates Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094224"></A>The Creates represents an association between an ActionElement and a Datatype such that the ActionElement creates an new instance of the Datatype.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094226"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094227"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094229"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094239"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1094232"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097279"></A>the action element which owns the Creates relationship</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1094236"></A>to:Datatype[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097281"></A>the DataElement which is the instantiated by the ActionElement </P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095414"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095415"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097535"></A>Creates relationship represents an association between an action element which creates a new instance of a certain data element to the corresponding datatype according to the semantics of the programming language of the existing software system.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1095863"></A>ExceptionBlocks Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1096304"></A>The Exceptions class diagram defines meta-model elements that represent containers involved in exception-handling mechanism common to several programming languages. These classes are illustrated at <A HREF="KDM_1.0_13_actionpkg.htm#57169" CLASS="XRef">See - ExceptionBlocks Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1096305"></A>Basic try-, catch- and finally-blocks are represented by dedicated containers defined as subclasses of the ExceptionUnit to represent the contents of those blocks. The TryUnit provides the containment to track the dependent Catch clauses and the optional finally block (for languages that support it).</P>
<P CLASS="Body">
<A NAME="pgfId-1096306"></A>The Catch container can own ParameterUnit to represent the data passed to it by the exception-handling mechanism when this block is activated, the so-called &quot;its catch object&quot;. This allows exceptions to be modeled like any other object and to have their own inheritance. The ParameterUnit that represents the &quot;catch object&quot; of a catch-block has special ParameterKind value kind=&quot;exception&quot; to represent parameter passing via exception mechanism or kind=&quot;catchall&quot; to represent the catch all construct in C++.</P>
<P CLASS="Body">
<A NAME="pgfId-1095868"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-6.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1095870"></A><A NAME="57169"></A>- ExceptionBlocks Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096296"></A>ExceptionUnit Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096368"></A>ExceptionUnit class is a generic meta-model element that provides a common superclass to various KDM containers for representing exception handling. ExceptionUnit is a subclass of a BlockUnit. ExceptionUnit is a KDM container, which can own both ActionElement (for example, statements in the catch-block) as well as CodeItem (for example, parameters to the catch-block, local definitions and nested blocks). ExceptionUnit is a generic element, and KDM models are expected to use concrete subclasses of ExceptionUnit with more precise semantics. However, ExceptionUnit can be used as an extended modeling element with a stereotype. ExceptionUnit is more specific than an BlockUnit.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096298"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095875"></A>BlockUnit</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095887"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1096464"></A>ExceptionUnit should have a stereotype</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095888"></A>Semantics</H6>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096420"></A>TryUnit class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096421"></A>TryUnit class is a meta-model element that represents try-blocks common to several programming languages. TryUnit is a container for action elements and associated definitions of CodeItems. The purpose of a TryUnit is to represent try-blocks and to manage exception flow to related catch-blocks and finally-block (for programming languages that support this concept). In particular, the TryUnit is the origin of ExceptionFlow relations to the corresponding CatchUnits and FinallyUnit blocks, which represent related catch- and finally-blocks. TryUnit may own nested TryUnit blocks.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096423"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096424"></A>ExceptionUnit</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096426"></A>Semantics:</H6>
<P CLASS="Body">
<A NAME="pgfId-1096427"></A>TryUnit represents a try-block.</P>
<P CLASS="Body">
<A NAME="pgfId-1096428"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096429"></A>CatchUnit class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096430"></A>CatchUnit is a meta-model element that represents catch-blocks. Particular CatchUnit should be associated to a particular TryUnit through ExceptionFlow relation. CatchUnit may contains ParameterUnit that represents the exception object passed to the catch-block by the exception-handling mechanism.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096432"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096433"></A>ExceptionUnit</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096533"></A>Constraints:</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1096534"></A>	CatchUnit should be associated to a TryUnit. In particular, a CatchUnit should be the target of an ExceptionFlow relationship which originates from some TryUnit. </H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096435"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1096436"></A>CatchUnit represents one of the catch-blocks associated with a certain try-block. Usually, one or more CatchUnits follow a TryUnit. Each CatchUnit should be associated with the corresponding TryUnit through an instance of ExceptionFlow relationship.</P>
<P CLASS="Body">
<A NAME="pgfId-1096440"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096441"></A>FinallyUnit class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096442"></A>FinallyUnit is a meta-model element which represents finally-block associated with a certain try-block. The FinallyUnit is associated with the core responding TryUnit through an ExitFlow relation. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096444"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096445"></A>ExceptionUnit</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096561"></A>Constraints:</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1096562"></A>	FinallyBlock should be associated to a TryUnit. In particular, a FinallyUnit should be the target of an ExitFlow 	relationship which originates from some TryUnit. </H6>
<OL>
<LI CLASS="List1-">
<A NAME="pgfId-1096563"></A>	TryUnit should not be associated with more than one FinallyBlock</LI>
</OL>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096447"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1096448"></A>FinallyBlock represents a finally-block associated with a certain try-block.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096454"></A>Example:</H6>
<P CLASS="example">
<A NAME="pgfId-1097559"></A>.&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097560"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097676"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097677"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097678"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097679"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;Exceptions Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097561"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097562"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;code:ClassUnit&quot; name=&quot;A&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097563"></A>      &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:MethodUnit&quot; name=&quot;foo&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097564"></A>        &lt;entryFlow xmi:id=&quot;id.3&quot; to=&quot;id.4&quot; from=&quot;id.2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097565"></A>        &lt;codeElement xmi:id=&quot;id.4&quot; xmi:type=&quot;action:TryUnit&quot; name=&quot;t1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097566"></A>          &lt;codeElement xmi:id=&quot;id.5&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a1&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097567"></A>            &lt;actionRelation xmi:id=&quot;id.6&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.23&quot; from=&quot;id.5&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097568"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097569"></A>          &lt;actionRelation xmi:id=&quot;id.7&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.5&quot; from=&quot;id.4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097570"></A>          &lt;actionRelation xmi:id=&quot;id.8&quot; xmi:type=&quot;action:ExceptionFlow&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097680"></A>				to=&quot;id.10&quot; from=&quot;id.4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097571"></A>          &lt;actionRelation xmi:id=&quot;id.9&quot; xmi:type=&quot;action:ExitFlow&quot; to=&quot;id.17&quot; from=&quot;id.4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097572"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097573"></A>        &lt;codeElement xmi:id=&quot;id.10&quot; xmi:type=&quot;action:CatchUnit&quot; name=&quot;c1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097574"></A>          &lt;codeElement xmi:id=&quot;id.11&quot; xmi:type=&quot;code:ParameterUnit&quot; name=&quot;e&quot; type=&quot;id.67&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097575"></A>          &lt;codeElement xmi:id=&quot;id.12&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a2&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097576"></A>            &lt;codeElement xmi:id=&quot;id.13&quot; xmi:type=&quot;code:Value&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097681"></A>				name=&quot;&amp;quot;Something went wrong&amp;quot;&quot; type=&quot;id.69&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097577"></A>            &lt;actionRelation xmi:id=&quot;id.14&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.13&quot; from=&quot;id.12&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097578"></A>            &lt;actionRelation xmi:id=&quot;id.15&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.66&quot; from=&quot;id.12&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097579"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097580"></A>          &lt;actionRelation xmi:id=&quot;id.16&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.12&quot; from=&quot;id.10&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097581"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097582"></A>        &lt;codeElement xmi:id=&quot;id.17&quot; xmi:type=&quot;action:FinallyUnit&quot; name=&quot;f1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097583"></A>          &lt;codeElement xmi:id=&quot;id.18&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a3&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097584"></A>            &lt;codeElement xmi:id=&quot;id.19&quot; xmi:type=&quot;code:Value&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097682"></A>				name=&quot;&amp;quot;Good bye&amp;quot;&quot; type=&quot;id.69&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097585"></A>            &lt;actionRelation xmi:id=&quot;id.20&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.19&quot; from=&quot;id.18&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097586"></A>            &lt;actionRelation xmi:id=&quot;id.21&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.66&quot; from=&quot;id.18&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097587"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097588"></A>          &lt;actionRelation xmi:id=&quot;id.22&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.18&quot; from=&quot;id.17&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097589"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097590"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097591"></A>      &lt;codeElement xmi:id=&quot;id.23&quot; xmi:type=&quot;code:MethodUnit&quot; name=&quot;bar&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097592"></A>        &lt;entryFlow xmi:id=&quot;id.24&quot; to=&quot;id.25&quot; from=&quot;id.23&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097593"></A>        &lt;codeElement xmi:id=&quot;id.25&quot; xmi:type=&quot;action:TryUnit&quot; name=&quot;t2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097594"></A>          &lt;codeElement xmi:id=&quot;id.26&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097683"></A>				name=&quot;a4&quot; kind=&quot;ArrayReplace&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097595"></A>            &lt;source xmi:id=&quot;id.27&quot; language=&quot;Java&quot; snippet=&quot;arr[20]=20&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097596"></A>            &lt;codeElement xmi:id=&quot;id.28&quot; xmi:type=&quot;code:Value&quot; name=&quot;20&quot; type=&quot;id.70&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097597"></A>            &lt;actionRelation xmi:id=&quot;id.29&quot; xmi:type=&quot;action:Addresses&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097684"></A>				to=&quot;id.59&quot; from=&quot;id.26&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097598"></A>            &lt;actionRelation xmi:id=&quot;id.30&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.28&quot; from=&quot;id.26&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097599"></A>            &lt;actionRelation xmi:id=&quot;id.31&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.28&quot; from=&quot;id.26&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097600"></A>            &lt;actionRelation xmi:id=&quot;id.32&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.61&quot; from=&quot;id.26&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097601"></A>            &lt;actionRelation xmi:id=&quot;id.33&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.34&quot; from=&quot;id.26&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097602"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097603"></A>          &lt;codeElement xmi:id=&quot;id.34&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a5&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097604"></A>            &lt;actionRelation xmi:id=&quot;id.35&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.59&quot; from=&quot;id.34&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097605"></A>            &lt;actionRelation xmi:id=&quot;id.36&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.66&quot; from=&quot;id.42&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097606"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097607"></A>          &lt;actionRelation xmi:id=&quot;id.37&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.26&quot; from=&quot;id.25&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097608"></A>          &lt;actionRelation xmi:id=&quot;id.38&quot; xmi:type=&quot;action:ExceptionFlow&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097685"></A>				to=&quot;id.40&quot; from=&quot;id.25&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097609"></A>          &lt;actionRelation xmi:id=&quot;id.39&quot; xmi:type=&quot;action:ExitFlow&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097610"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097611"></A>        &lt;codeElement xmi:id=&quot;id.40&quot; xmi:type=&quot;action:CatchUnit&quot; name=&quot;c2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097612"></A>          &lt;codeElement xmi:id=&quot;id.41&quot; xmi:type=&quot;code:ParameterUnit&quot; name=&quot;e&quot; type=&quot;id.68&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097613"></A>          &lt;codeElement xmi:id=&quot;id.42&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a6&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097614"></A>            &lt;codeElement xmi:id=&quot;id.43&quot; xmi:type=&quot;code:Value&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097686"></A>				name=&quot;&amp;quot;Oops&amp;quot;&quot; type=&quot;id.69&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097615"></A>            &lt;actionRelation xmi:id=&quot;id.44&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.43&quot; from=&quot;id.47&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097616"></A>            &lt;actionRelation xmi:id=&quot;id.45&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.66&quot; from=&quot;id.42&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097617"></A>            &lt;actionRelation xmi:id=&quot;id.46&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.47&quot; from=&quot;id.42&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097618"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097619"></A>          &lt;codeElement xmi:id=&quot;id.47&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a7&quot; kind=&quot;Throw&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097620"></A>            &lt;codeElement xmi:id=&quot;id.48&quot; xmi:type=&quot;code:Value&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097687"></A>				name=&quot;&amp;quot;Went too far&amp;quot;&quot; type=&quot;id.69&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097621"></A>            &lt;actionRelation xmi:id=&quot;id.49&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.48&quot; from=&quot;id.47&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097622"></A>            &lt;actionRelation xmi:id=&quot;id.50&quot; xmi:type=&quot;action:Throws&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097623"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097624"></A>          &lt;actionRelation xmi:id=&quot;id.51&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.42&quot; from=&quot;id.40&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097625"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097626"></A>        &lt;codeElement xmi:id=&quot;id.52&quot; xmi:type=&quot;action:FinallyUnit&quot; name=&quot;f2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097627"></A>          &lt;codeElement xmi:id=&quot;id.53&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a8&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097628"></A>            &lt;actionRelation xmi:id=&quot;id.54&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.59&quot; from=&quot;id.53&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097629"></A>            &lt;actionRelation xmi:id=&quot;id.55&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.66&quot; from=&quot;id.42&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097630"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097631"></A>          &lt;actionRelation xmi:id=&quot;id.56&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.53&quot; from=&quot;id.52&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097632"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097633"></A>        &lt;codeElement xmi:id=&quot;id.57&quot; xmi:type=&quot;code:Signature&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097634"></A>          &lt;parameterUnit xmi:id=&quot;id.58&quot; type=&quot;id.63&quot; kind=&quot;throws&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097635"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097636"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097637"></A>      &lt;codeElement xmi:id=&quot;id.59&quot; xmi:type=&quot;code:MemberUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097688"></A>			name=&quot;arr&quot; type=&quot;id.60&quot; size=&quot;10&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097638"></A>        &lt;codeElement xmi:id=&quot;id.60&quot; xmi:type=&quot;code:ArrayType&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097639"></A>          &lt;itemUnit xmi:id=&quot;id.61&quot; type=&quot;id.70&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097640"></A>          &lt;indexUnit xmi:id=&quot;id.62&quot; type=&quot;id.70&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097641"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097642"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097643"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097644"></A>    &lt;codeElement xmi:id=&quot;id.63&quot; xmi:type=&quot;code:ClassUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097689"></A>			name=&quot;MoreDescriptiveException&quot; isAbstract=&quot;true&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097645"></A>      &lt;codeRelation xmi:id=&quot;id.64&quot; xmi:type=&quot;code:Extends&quot; to=&quot;id.67&quot; from=&quot;id.63&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097646"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097647"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097648"></A>  &lt;model xmi:id=&quot;id.65&quot; xmi:type=&quot;code:CodeModel&quot; name=&quot;Java common definitions&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097649"></A>    &lt;codeElement xmi:id=&quot;id.66&quot; xmi:type=&quot;code:CallableUnit&quot; name=&quot;println&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097650"></A>    &lt;codeElement xmi:id=&quot;id.67&quot; xmi:type=&quot;code:ClassUnit&quot; name=&quot;Exception&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097651"></A>    &lt;codeElement xmi:id=&quot;id.68&quot; xmi:type=&quot;code:ClassUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1097690"></A>			name=&quot;ArrayIndexOutOfBoundsException&quot; isAbstract=&quot;false&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097652"></A>    &lt;codeElement xmi:id=&quot;id.69&quot; xmi:type=&quot;code:StringType&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097653"></A>    &lt;codeElement xmi:id=&quot;id.70&quot; xmi:type=&quot;code:IntegerType&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097654"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1097655"></A>&lt;/kdm:Segment&gt;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1095911"></A>ExceptionFlow Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1096594"></A>ExceptionFlow class diagram defines meta-model elements that represent flow of control determined by exception handling mechanism common to several programming languages.</P>
<P CLASS="Body">
<A NAME="pgfId-1096596"></A>Because of their somewhat unpredictable nature, exceptions can create havoc in performing flow analysis. The concepts here support tracking both user-defined exceptions, normal system exceptions and runtime exceptions. </P>
<P CLASS="Body">
<A NAME="pgfId-1096597"></A>There exist certain action elements (for example, representing statements) where the exceptions are raised and that throw the exception and initiate the transfer of control to the exception flow. The flow for these is represented by the ExceptionFlow class. The ExceptionFlow relationship goes from an ActionElement representing the source of the throw, to a CallableElement that represents the catcher of the exception. The ExceptionFlow target is the either the local CatchUnit that will handle the exception or point back to the TryUnit.</P>
<P CLASS="Body">
<A NAME="pgfId-1096598"></A>Exception flow elements are optional for L0 KDM models. KDM export tools at L0 compliance level may lack the full understanding necessary to precisely pinpoint the source of an Exception. KDM model produced by one tool can be further analyzed by a different tool to add more information about the flow of control determined by the exception handling mechanism. The origin of the ExceptionFlow can be under specified and use the TryUnit as the &quot;from&quot; point for the ExceptionFlow, thus omitting the details of exactly where the exception might have been raised. For user-defined exceptions, tools should normally be able to capture the origin points by analyzing the various methods invoked and recursively analyzing their code and also by taking advantage of the declaration throws clause (except that this might list exceptions that are not always thrown). As for system/runtime exceptions, it is really up to the implementer to determine how much they want to capture. Knowing what type of operations can cause those kinds of exceptions can go a long way in supporting complex analysis. </P>
<P CLASS="Body">
<A NAME="pgfId-1096599"></A>For each exception that a method invocation can raised, there should be an ExceptionFlow from that point to the immediate catcher, unless the user chose to only represent the exception generically from the TryUnit. In those cases there should be as many ExceptionFlow as there are possible exceptions that can be raised by the code in the try block.</P>
<P CLASS="Body">
<A NAME="pgfId-1096600"></A>Next if there is a finally clause, a finally flow would go from the TryUnit to the FinallyUnit to cover the finalization. The FinallyFlow is represented with a general ExitFlow relationship. This concept might appear to be a bit convoluted since normal flow would go from the end of the try and flow to the finally block and from there to the next block, but the process when we are analyzing the exception flow is as follows: For each TryUnit that the ExceptionFlow must unwind to reach its destination, it must check for an ExitFlow in the TryUnit and run through that flow before unwinding the call stack. This is repeated until the CatchUnit is reached (either it was local and already the endpoint of the ExceptionFlow or it is determined by analysis during unwinding). Then the flow for the catch is performed, followed by an ExitFlow local to the Catch, if one exists. This is as consistent as possible with the separate mechanism used by exception supporting languages to handle try/catch functionality in the first place. As stated by Bjarne Stroustrup, &quot;The exception handling mechanism is a non local control structure based on stack unwinding that can be seen as an alternative return mechanism&quot;. Hence the necessity for the extra level of smarts needed to analyze those flow paths.</P>
<P CLASS="Body">
<A NAME="pgfId-1096601"></A>Exceptions raised and caught within exceptions catch blocks should create and manage their own flow path.</P>
<P CLASS="Body">
<A NAME="pgfId-1095916"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-7.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1095918"></A>- ExceptionFlow Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095920"></A>ExitFlow Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096639"></A>ExitFlow class is a meta-model element that represents an implicit flow of control which should be taken when the corresponding block is exiting and has terminated normally or abruptly after executing the catch-block. For example, ExitFlow can be used to relate a try-block with the corresponding finally-block.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095922"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095923"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095924"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1095934"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1095927"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId-1095929"></A>ActionElement (for example, a try-block) for which the &quot;on-exit&quot; behavior was specified</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1095931"></A>to:ActionElement[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId-1095933"></A>ActionElement (usually, a finally-block) which represents the behavior that is invoked upon successful exit of the origin block (&quot;on exit&quot;)</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095935"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095936"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097699"></A>ExitFlow relationship represent an association between a TryUnit and the corresponding FinallyBlock according to the semantics of the programming language of the existing software system.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096695"></A>Example:</H6>
<P CLASS="Body">
<A NAME="pgfId-1096696"></A>See example in section ExceptionBlocks</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095968"></A>ExceptionFlow Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095969"></A>The ExceptionFlow relationship represents an exception flow relationship between a TryUnit and the corresponding CatchUnit, or between a particular action element that can raise an exception to the corresponding CatchUnit. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095970"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095971"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095972"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1095982"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1095975"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1095977"></A>the origin of the exception flow</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1095979"></A>to:ActionElement[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1095981"></A>the CatchUnit to which control is transferred when an exception is raised</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095983"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1097305"></A>The target action element of the ExceptionFlow relationship should be a CatchUnit</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095984"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095966"></A>ExceptionFlow relationship represents a exception control flow between an action element that raises a certain exception, and the CatchUnit that handles this exception according the semantics of the programming language of the existing software system.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1095998"></A>ExceptionRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1095999"></A>The ExceptionRelations class diagram defines a set of meta-model elements that represent data flow relationships associated with exception handling mechanism common to various programming languages. </P>
<P CLASS="Body">
<A NAME="pgfId-1096003"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-8.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1096004"></A>- ExceptionRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096005"></A>Throws Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096706"></A>The Throws class is a meta-model element that represents throw-statements supported by several programming languages. These are the user-defined throws for exception, as opposed to the so-called normal system exceptions and runtime exceptions. Throw statements are essentially regular code elements, which simply have an additional relationship to their throw entity, using the Throws relationship.</P>
<P CLASS="Body">
<A NAME="pgfId-1096707"></A>See ExceptionBlocks and ExceptionFlow for representation of the control flow, related to exception handling mechanism.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096007"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096008"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096009"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1096019"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1096012"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId-1096014"></A>The ActionElement that throws the exception</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1096016"></A>to:DataElement[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId-1096018"></A>The exception data element being thrown</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096020"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096021"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096022"></A>Throws relationship represents an association between an action element that raises a certain exception and the data element that is associated with that exception. It is the implementer's responsibility to identify and represent these association according to the semantics of the programming language of the existing software system.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1094360"></A><A NAME="_Toc131848324"></A>InterfaceRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1094362"></A>The InterfaceRelations class diagram defines KDM relationships that represent the usages of an &quot;declarations&quot; by the action elements. The classes and associations of the InterfaceRelations diagram are shown at <A HREF="KDM_1.0_13_actionpkg.htm#22069" CLASS="XRef">See - InterfaceRelations Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1093504"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-9.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1094603"></A><A NAME="22069"></A>- InterfaceRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094618"></A>CompliesTo Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096937"></A>The CompliesTo is a meta-model element that represents an association between an action element which &quot;uses&quot; some computational object, and the &quot;declaration&quot; of that computational object. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094621"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094622"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094624"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094634"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1094627"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1094629"></A>the origin of the relationship; action element that &quot;uses&quot; some computational object</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1094631"></A>to:CodeItem[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1094633"></A>the &quot;declaration&quot; of that computational object</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094636"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1096953"></A>The kind attribute of the CodeItem at the target of the CompliesTo relationship should be equal to &quot;external&quot; or &quot;abstract&quot;</H6>
<OL>
<LI CLASS="List1-">
<A NAME="pgfId-1096970"></A>The action element which is the origin of the &quot;CompliesTo&quot; relationship should own a callable or data action relationship to some computational object and the target of CompliesTo relationship should be one of the declarations of that computational object</LI>
</OL>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094638"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096969"></A>See InterfaceRelations section of the Code package chapter.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1094843"></A><A NAME="_Toc131848331"></A><A NAME="_Toc131848332"></A>UsesRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1094845"></A>The UsesRelations class diagram defines meta-model elements that represent associations between ActionElement and Datatype related to type cast operations. The class diagram shown in <A HREF="KDM_1.0_13_actionpkg.htm#47624" CLASS="XRef">See - UsesRelations Class Diagram.</A> captures these classes and their relations.</P>
<P CLASS="Body">
<A NAME="pgfId-1094967"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-10.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1094968"></A><A NAME="47624"></A>- UsesRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094977"></A><A NAME="_Toc131848333"></A>UsesType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094978"></A>The UsesType relationship represents a type cast or a type conversion performed by an ActionElement.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094980"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094981"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094983"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094993"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1094986"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1094988"></A>the action element that performs a type cast or a type conversion</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1094990"></A>to:Datatype[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1094992"></A>the datatype involved in a type operation</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094995"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094997"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097714"></A>UsesType relationship represents an association between an action element which performs a type cast or a type conversion operation and the corresponding Datatype. The precise nature of the type operation can be further specified by the &quot;kind&quot; attribute of the action element. See the &quot;micro KDM&quot; chapter.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1096078"></A>ExtendedActionElements Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1097325"></A>The ExtendedActionElements class diagram defines an additional &quot;wildcard&quot; generic element for the code model as determined by the KDM model pattern: a generic action relationship.</P>
<P CLASS="Body">
<A NAME="pgfId-1097329"></A> The classes and associations of the ExtendedActionElements diagram are shown in <A HREF="KDM_1.0_13_actionpkg.htm#83287" CLASS="XRef">See - ExtendedActionElements Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1096083"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_13_actionpkg-11.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1096085"></A><A NAME="83287"></A>- ExtendedActionElements Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096087"></A>ActionRelationship Class (generic)</H4>
<P CLASS="Body">
<A NAME="pgfId-1097354"></A>The ActionRelationship is a generic meta-model element that can be used to define new &quot;virtual&quot; meta-model elements through the KDM light-weight extension mechanism </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097356"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096090"></A>AbstractActionRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096091"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1096101"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1096094"></A>from:ActionElement[1] </H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1096096"></A>the origin action element</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<H6 CLASS="TableText1">
<A NAME="pgfId-1096098"></A>to:KDMEntity[1]</H6>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1096100"></A>the target KDM entity</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096102"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1097362"></A>ActionRelationship should have at least one stereotype</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097363"></A>Semantics</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097364"></A>An action relationship with under specified semantics. It is a concrete class that can be used as the base element of a new &quot;virtual&quot; meta-model relationship types of the code model. This is one of the KDM extension points which can integrate additional language-specific, application-specific or implementer-specific pieces of knowledge into the standard KDM representation.</P>
<P CLASS="Body">
<A NAME="pgfId-1097365"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1088609"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
</DIV>
</BODY>
</HTML>
